<template>
	<el-dialog title="删除数据" v-model="c_del_data_dialog" width="30%" :show-close="false">
		<template #footer>
			<span>
				<el-button @click="cancelDelData">取 消</el-button>
				<el-button type="primary" @click="confirmDelData">确定删除</el-button>
			</span>
		</template>
		<slot></slot>
	</el-dialog>
</template>

<script>
	export default {

		data() {
			return {
				c_del_data_dialog: this.del_data_dialog
			}
		},
		props: ['del_data_dialog'],
		watch: {
			del_data_dialog(val) {
				this.c_del_data_dialog = val;
			}
		},
		emits: ["getDelData","getCancelDelData"],
		methods: {
			confirmDelData() {
				let self = this;
				self.c_del_data_dialog = false;
				self.$emit('getDelData', {
					child_del_data_dialog: self.c_del_data_dialog
				});
			},
      cancelDelData() {
        let self = this;
        self.c_del_data_dialog = false;
        self.$emit('getCancelDelData', {
          child_del_data_dialog: self.c_del_data_dialog
        });
      }
		}
	}
</script>

<style>
</style>
